# -*- tcl -*-
# finite_automaton.test:  tests for the grammar::fa container.
#
# Copyright (c) 2004-2007 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# RCS: @(#) $Id: fa_is_epsfree.test,v 1.4 2007/04/12 03:43:14 andreas_kupries Exp $

# -------------------------------------------------------------------------

foreach {n code result} {
    00 x        1
    01 x-       1
    02 xe      0
    03 xy       1
    04 xy-      1
    05 xye     0
    06 xyee    0
    07 xye-    0
    08 xy--     1
    09 xy-=     1
    10 xyz/ee  0
    11 xyz/e-  0
    12 xyz/--   1
    13 xyz/-=   1
    14 xyz|ee  0
    15 xyz|e-  0
    16 xyz|--   1
    17 xyz|-=   1
    18 xyz+eee 0
    19 xyz+ee- 0
    20 xyz+e-- 0
    21 xyz+e-= 0
    22 xyz+---  1
    23 xyz+--=  1
    24 xyz+-=_  1
    25 xyz&eee 0
    26 xyz&ee- 0
    27 xyz&e-- 0
    28 xyz&e-= 0
    29 xyz&---  1
    30 xyz&--=  1
    31 xyz&-=_  1
    32 xyz!ee  0
    33 xyz!e-  0
    34 xyz!--   1
    35 xyz!-=   1
    36 xyz!-e  0
} {
    test fa-is-${setimpl}-epsilonfree-1.${n}.$code {is epsilon free} {
	grammar::fa a
	gen $code
	set res [a is epsilon-free]
	a destroy
	set res
    } $result ; # {}
}


# -------------------------------------------------------------------------
::tcltest::cleanupTests
